<include file="Public:head" />
<style>

    .table-striped tr  .td_dan{
        line-height: 30px;text-align: right;width: 50px
    }
    .width20{
        width: 700px;
    }
    .img{
        width: 100px;
        line-height: 34px;
        background-color: #cccccc;
        text-align: center;
        cursor: pointer;
        border-radius: 3px;
        font-size: 14px;
        display:inline-block;
    }
    .img_hide{
        position: relative;
        top: 10px;
        z-index:10;
        width: 100px;
        height: 34px;
        opacity: 0;
        cursor: pointer;
    }
</style>
<script type="text/javascript" src="__STATIC__/kindeditor-4.1.10/kindeditor-min.js"></script>
<script type="text/javascript" src="__STATIC__/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script type="text/javascript">
    //天涯PHP博客 http://blog.phpha.com
    KindEditor.ready(function(K){
        K.create('textarea[name="content"]', {
            themeType: 'simple',
            resizeType: 1,
            uploadJson: 'common/KEditor/upload_json.php',
            fileManagerJson: 'common/KEditor/file_manager_json.php',
            allowFileManager: true,
            //经测试，下面这行代码可有可无，不影响获取textarea的值
            //afterCreate: function(){this.sync();}
            //下面这行代码就是关键的所在，当失去焦点时执行 this.sync();
            afterBlur: function(){this.sync();}
        });
    });
</script>
<body class="overflow-hidden">
<div class="wrapper preload">
    <include file="Public:header" />
    <include file="Public:left" />
    <div class="main-container">
        <div class="padding-md">
            <div class="row">
                <div class="col-sm-12">
                    <div class="page-title">
                        {$info['id']?'编辑':'添加'}FAQ
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="smart-widget widget-green">
                        <form action="{:U('problem_menu')}" method="post" class="form-admin3" >
                            <table class="table table-striped no-margin" >
                                <tr >
                                    <td  style="width: 10%;text-align: right;line-height: 34px">标题</td>
                                    <td >
                                        <input type="text" class="form-control width20" name="title" value="{$info.title}" placeholder="最多255个字符">
                                    </td>
                                </tr>
                                <tr >
                                    <td  style="width: 10%;text-align: right;line-height: 34px">作者</td>
                                    <td >
                                        <input type="text" class="form-control width20" name="author" value="{$info.author}">
                                    </td>
                                </tr>
                                <tr >
                                    <td  style="width: 10%;text-align: right;line-height: 34px">来源</td>
                                    <td >
                                        <input type="text" class="form-control width20" name="source" value="{$info.source}" >
                                    </td>
                                </tr>
                                <tr >
                                    <td  style="width: 10%;text-align: right;line-height: 34px">是否置顶</td>
                                    <td >
                                        <span style="line-height: 34px">
                                            <input type="radio" name="is_top" value="1" {$info['is_top']==1?'checked':''} checked>是
                                            <input type="radio" name="is_top" value="2" {$info['is_top']==2?'checked':''}>否
                                        </span>
                                    </td>
                                </tr>

                                <tr >
                                    <td  style="width: 10%;text-align: right;line-height: 34px">内容</td>
                                    <td >
                                        <textarea name="content" id="" cols="30" rows="10" class="form-control" style="width:700px;min-height:300px">{$info['content']}</textarea>
                                    </td>
                                </tr>
                                <tr class="result_list">
                                    <td>&nbsp;</td>
                                    <td>
                                        <input type="hidden" name="id" value="{$info.id}">
                                        <input class="action-button ajax-post" target-form="form-admin3"  type="submit" value="保存">
                                        <button class="action-button" type="button" onclick="javascript:history.back(-1);return false;">返回</button>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div><!-- ./smart-widget -->
                </div><!-- ./col -->
            </div><!-- ./row -->
        </div><!-- ./padding-md -->
    </div><!-- /main-container -->
    <include file="Public:foot" />
</div><!-- /wrapper -->
<!--<include file="Public/base_fc" />-->
<a href="#" class="scroll-to-top hidden-print"><i class="fa fa-chevron-up fa-lg"></i></a>
</body>
</html>
<block name="script">
    <script>
        $(function(){
            highlight_nav2('{:U("Problem/index")}');
        })
    </script>
</block>

